{template file="cms/header.html"/}
<script type="text/javascript">
//全局变量
var GV = {
    'image_upload_url': '{$image_upload_url ? $image_upload_url : url("attachment/upload/upload", ["dir" => "images", "module" => request()->module()])}',
    'file_upload_url': '{$file_upload_url ? $file_upload_url : url("attachment/upload/upload", ["dir" => "files", "module" => request()->module()])}',
    'WebUploader_swf': '__STATIC__/webuploader/Uploader.swf',
    'ueditor_upload_url': '{$ueditor_upload_url ? $ueditor_upload_url : url("attachment/upload/upload", ["dir" => "images","from"=>"ueditor", "module" => request()->module()])}',
    'ueditor_grabimg_url': '{$ueditor_upload_url ? $ueditor_upload_url : url("attachment/Attachments/geturlfile")}',
};
</script>
<link rel="stylesheet" href="__STATIC__/libs/layui/css/layui.css">
<script src="__STATIC__/libs/layui/layui.js"></script>
<script src="__STATIC__/libs/jquery/jquery.min.js"></script>
<style type="text/css">
body {
    background: #f6f6f6;
}
/*百度上传*/
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    -webkit-transition: border .2s ease-in-out;
    -o-transition: border .2s ease-in-out;
    transition: border .2s ease-in-out;
    display: inline-block;
    position: relative;
    margin-right:15px;
    float: left;
}
.file-item.thumbnail .info{
    display: none;
}
.file-item.thumbnail .remove-picture{
    position: absolute;
    right: -5px;
    top: -5px;
    font-size: 18px;
    color: #CA4949;
    cursor: pointer;
    display: none;
    z-index: 5;
}
.file-item.thumbnail .remove-picture:hover{
    color: #EC6969;
}
.file-item.thumbnail .move-picture{
    background: gainsboro;
    padding: 2px;
    cursor: move;
    color: #ABABAB;
    position: absolute;
    left: -6px;
    top: -5px;
    border-radius: 50%;
    display: none;
    z-index: 5;
    width: 16px;
    height: 16px;
    line-height: 16px;
}
.file-item.thumbnail:hover .remove-picture,
.file-item.thumbnail:hover .move-picture{
    display: block;
}
.file-item .progress.progress-xs{
    margin-bottom: 5px;
    margin-top: 5px;
}
.file-item .error,
.file-item .img-state{
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    color: white;
    text-align: center;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
}
.file-item .error{
    background: rgba(255, 0, 0, 0.67);
}
.file-item .success{
    background: rgba(25, 167, 75, 0.78);
}
.uploader-list .list-group-item img{
    width: 40px;
    height: 40px;
}
.file-item .fa-check {
    color: #68C39F;
    margin-top: 3px;
}

.progress.progress-mini {
    height: 5px;
}
.remove-margin {
    margin: 0 !important;
}
.progress {
    height: 24px;
    border-radius: 2px;
    -webkit-box-shadow: none;
    box-shadow: none;
}
.progress {
    height: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.progress.progress-mini .progress-bar {
    line-height: 5px;
}
.progress-bar.active, .progress.active .progress-bar {
    -webkit-animation: progress-bar-stripes 2s linear infinite;
    -o-animation: progress-bar-stripes 2s linear infinite;
    animation: progress-bar-stripes 2s linear infinite;
}
.progress-bar-primary {
    background-color: #ff6b6b;
}
.progress-bar-primary {
    background-color: #5c90d2;
}
.progress-bar {
    line-height: 24px;
    font-weight: 600;
    -webkit-box-shadow: none;
    box-shadow: none;
}
.progress-bar-striped, .progress-striped .progress-bar {
    background-image: -webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-image: -o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    -webkit-background-size: 40px 40px;
    background-size: 40px 40px;
}
.progress-bar {
    float: left;
    width: 0;
    height: 100%;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
    text-align: center;
    background-color: #337ab7;
    -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
    -webkit-transition: width .6s ease;
    -o-transition: width .6s ease;
    transition: width .6s ease;
}
.sortable-ghost{opacity:.4}
.uploader-list .thumbnail>img {
    cursor: zoom-in;
}
form .verify-box input {
    display: inline-block;
    width: 60%;
}
form .verify-box img {
    display: inline-block;
    margin-left: 2%;
    width: 36%;
    height: 38px;
}
</style>
<div class="headline-bg"></div>
<div class="main">
    <div class="w1200">
        <div class="container-top">
            <h2>自定义表单<span>message</span></h2>
            <!-- 面包屑 -->
            <div class="bread-nav">
                <a href="">首页</a>&gt; 自定义表单
            </div>
        </div>
        <div class="content">
            <form class="layui-form" method="post" action="{:url('formguide/index/post')}" style="width: 300px">
                <input type="hidden" name="id" value="{$id}" />
                {include file="inputItem" /}
                {if count($fieldList)}
                {if $modelInfo.setting.isverify}
                <div class="layui-form-item verify-box">
                    <div>
                    <input type="text" name="captcha" placeholder="验证码*" value="" class="layui-input">
                    <img id="verify" src="{:url('api/checkcode/getVerify','font_size=18&imageW=130&imageH=38')}" title="点击刷新" alt="验证码" class="captcha">
                    </div>
                </div>
                {/if}
                <div class="layui-form-item">
                    <div>
                        <button class="layui-btn ajax-post" lay-submit lay-filter="*" target-form="form-horizontal">立即提交</button>
                    </div>
                </div>
                {/if}
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
//刷新验证码
$("#verify").click(function() {
    var verifyimg = $("#verify").attr("src");
    $("#verify").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
});
</script>
{template file="cms/footer.html"/}